{include file="public/head"/}
<div class="container-fluid" id="main">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info">
                <button type="button" class="close">×</button>
                <p></p>
            </div>
        </div>
    </div>
   
   
  <div class="ntDesktop">
    <div class="row clearfix" id="search-box" style="margin-top:0">
        <div class="col-md-12 column text-right">
            <div class="form-inline" style="text-align: right;">
                <div class="form-group">
                    <input type="text" class="form-control" id="searchText" value="" placeholder="{:lang('please_enter_na_abbreviation')}">
                    <input type="text" class="form-control" id="searchContent" value="" placeholder="{:lang('please_enter_content')}">
                </div>
                <div class="form-group">
                    <button type="" @click="getSearchText" class="btn btn-default">{:strtoupper(lang('search'))}</button>
                </div>
            </div>
        </div>
    </div>
    <div class="ntDesktop-head" v-cloak>{{title}}</div>

        <div class="row clearfix" style="padding-top:12px">
            <div class="col-md-6 column">
                <ul class="nav nav-tabs">
                    <li v-if="isshow_search" class="active">
                        <a href="#home" data-toggle="tab" class="ptlang"
                        >搜索结果<span class="glyphicon glyphicon-remove shdow" style="margin-left: 10px;" @click="shdow"></span></a>
                    </li>
                    <li :class="{'active':lang==langitem.code && !isshow_search}" v-for="(langitem,index) in langs">
                    <a href="#home" data-toggle="tab" id="list-all" @click="changelang(langitem.code)">{{langitem.name}}</a>
                    </li>
                </ul>
            </div>
            <div class="col-md-6 column text-right">
                <div>
                    <a href="{:url('multilanguage/addopen')}" class='btn btn-primary' data-toggle="modal" data-target="#multilanguage_editModal" v-if="auth_ids.indexOf(352) != -1">
                      <span class="glyphicon glyphicon-plus"></span> {:strtoupper(lang("add_new_language_content"))}
                    </a>
                </div>
            </div>
        </div>

        <div class="row clearfix">
            <div class="col-md-12 column">
                <table class="table table-striped table-hover ntTable" v-cloak>
                    <thead>
                        <tr>
                            <th class="text-center">ID</th>
                            <th> {:strtoupper(lang("abbreviation"))} </th>
                            <th> {:strtoupper(lang("translate_content"))} </th>
                            <!-- <th class="sorting_desc"> {:lang('edit')} </th> -->
                            <th> {:strtoupper(lang('operate'))} </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(item,index) in datalist">
                            <td >{{item.id}}</td>
                            <td> {{item.abbreviation}} </td>
                            <td align="left"> {{item.content}}  </td>
                            <!-- <td> PAULO <br /><small>27/06/2019 12:36:25 </small></td> -->
                            <td class="text-right">
                                <div>
                                    <a :href="'/admin/multilanguage/editopen?id='+item.id+'&abbreviation='+item.abbreviation" class='btn btn-sm btn-primary' data-toggle="modal" data-target="#multilanguage_editModal" v-if="auth_ids.indexOf(353) != -1">
                                        <span class="glyphicon glyphicon-pencil"></span> {:strtoupper(lang('edit'))}</button>
                                    <a href="#" class='btn btn-sm btn-default option-del' @click="requestDelete(item.abbreviation)" v-if="auth_ids.indexOf(354) != -1">
                                        <span class="glyphicon glyphicon-remove"></span> {:strtoupper(lang('delete'))}</a>
                                </div>
                            </td>
                        </tr>
                        <tr style="text-align: center;"  v-if="datalist.length==0">
                                <td colspan="4" class="no_date">{:lang('no_data')}</td>
                            </tr>
                    </tbody>
                </table>
                <ul class="pagination" id="pagination" v-show="datalist.length!=0">
                </ul>
            </div>
        </div>
  </div>
</div>


<!--添加弹窗部分 开始-->
<div class="modal fade" id="multilanguage_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel" aria-hidden="true"  data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!--弹窗部分 结束-->
<script type="text/javascript">
    $("#multilanguage_editModal").on("hidden.bs.modal", function() {
        $(this).removeData("bs.modal");
        $(".modal-content").children().remove();
    });
</script>
<script src="/static/Admin/js/multilanguage.js"></script>
{include file="public/foot"/}